package org.persistente.esquema;

import java.lang.reflect.Field;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;

/**
 * Relação atributo-campo do tipo TIMESTAMP.
 */
public class CampoTimestamp extends CampoAbstrato<Timestamp> {

    public CampoTimestamp(Field campo) {
        super(campo);
    }

    
    @Override
    public Timestamp get(ResultSet rs) throws SQLException {
        return rs.getTimestamp(getNome());
    }

    @Override
    public void set(PreparedStatement ps, int ind, Timestamp valor) throws SQLException {
        ps.setTimestamp(ind, valor);
    }
}
